<?php

class Application_Model_AssocOffrAddr 
{
	protected $_offrAddrId;
	protected $_offerId;
	protected $_addressId;
	
	public function __construct(array $options = null)
	{
		if (is_array($options)) {
			$this->setOptions($options);
		}
	}
	
	public function __set($name, $value)
	{
		$method = 'set' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid Assoc offer address property');
		}
		$this->$method($value);
	}
	
	public function __get($name)
	{
		$method = 'get' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid Assoc offer address property');
		}
		return $this->$method();
	}
	
	public function setOptions(array $options)
	{
		$methods = get_class_methods($this);
		foreach ($options as $key => $value) {
			$method = 'set' . ucfirst($key);
			if (in_array($method, $methods)) {
				$this->$method($value);
			}
		}
		return $this;
	}
	
	
	/**
	 * @return the $_offerId
	 */
	public function getOfferId() {
		return $this->_offerId;
	}

	/**
	 * @return the $_addressId
	 */
	public function getAddressId() {
		return $this->_addressId;
	}

	/**
	 * @param field_type $_offerId
	 */
	public function setOfferId($_offerId) {
		$this->_offerId = $_offerId;
	}

	/**
	 * @param field_type $_addressId
	 */
	public function setAddressId($_addressId) {
		$this->_addressId = $_addressId;
	}
	/**
	 * @return the $_offrAddrId
	 */
	public function getOffrAddrId() {
		return $this->_offrAddrId;
	}

	/**
	 * @param field_type $_offrAddrId
	 */
	public function setOffrAddrId($_offrAddrId) {
		$this->_offrAddrId = $_offrAddrId;
	}


	
	
}